package ar.edu.unlp.info.tesis.domain;


import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonTypeName;

/**
 * Espec: https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#object
 * 
 *
 */
@Entity
@Table(name = "Activity")
@DiscriminatorValue(value = "ACTIVITY")
@JsonTypeName("ACTIVITY")

public class Activity extends Entidad implements StatementObject{
	
	private long dataBaseId;
	
	private String id;
	
	private String name;
	
	private String description;
	
	@Id
	@GeneratedValue
	@JsonIgnore
	@Column(name = "DATABASEID")
	public long getDataBaseId() {
		return dataBaseId;
	}
	
	public void setDataBaseId(long dataBaseId) {
		this.dataBaseId = dataBaseId;
	}

	@Column(name="ID", unique=true, nullable=false)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column (name= "NAME", nullable=false)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "DESCRIPTION")
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}	

	@Override
	@Transient
	public String getObjectType() {
		return StatementObject.ACTIVITY;
	}

	@Override
	@Transient
	public String getLabelFormat() {
		return this.getName();
	}
}
